Test latency jitter under stress condition Single-threaded executor Default autoware with hot path
In [20]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
End-to-End path¶
In [21]:
lttng = Lttng('./single_threaded_executor_stress_fixed_workload')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
converting: 292275it [00:15, 18554.71it/s]
292167 events found.
loading: 100%|████████████████████████████████████████████████████████████▉| 292165/292167 [00:08<00:00, 33807.84it/s]
In [22]:
# arch.export('architecture.yaml')
In [23]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [24]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [25]:
# arch.export('architecture_with_e2e_path.yaml')
In [26]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'. WARNING : 2024-01-16 13:31:49 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[26]:
False
In [27]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[27]:
In [28]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[28]:
In [29]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [30]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 13:31:55 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [31]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
Hot Path¶
In [32]:
lttng = Lttng('./single_threaded_executor_stress_fixed_workload')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
292165 events found.
loading: 100%|█████████████████████████████████████████████████████████████| 292165/292165 [00:08<00:00, 33694.59it/s]
In [33]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-16 13:32:56 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-16 13:32:56 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-16 13:32:56 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-16 13:32:56 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-16 13:32:56 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[33]:
False
In [34]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[34]:
In [35]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[35]:
In [36]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [37]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 13:33:02 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [38]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [ ]: